file_path = "D:\\hello.txt"
user_input = input("请输入一段文字：")
with open(file_path, "w", encoding="utf-8") as file:
    file.write(user_input)
print("您的文字已保存到 " + file_path)
